Forgot to return out of the if condition