Fixed the if block