If and elseifs fixed