Made if-else-order more clear.