Fixed a few errors

Errors in if else statement fixed