Fixed weird piece of code