Fixed a weird if statements