Forgot to end if loop