Fixed if-error