Please help me understand this behavior

Have you tried:

? I've found that sometimes I can get the else if to work and sometimes it does not.