fixed last if