Add missing else statement to if-else chain