Fixed a strange piece of code