I made a mistake in the code. It should work fine now. (It is updated)