Fix infinite loop if maprotation is empty