Fixed missing part in if statement