Fixed if else block