fix reversed cases