Fixed code

Fixed code, trying to find the most efficient way to write the else.