Syntax fixes

Removed the if statement, I don't know its purpose and it also had a syntax error.
Also fixed a missing {