Fix a serious warning/bug involving a dangling else and a messy conditional imbrication
Fix a serious warning/bug involving a dangling else and a messy conditional imbrication

KevinAuSon/easea,KevinAuSon/easea,EASEA/easea,EASEA/easea,KevinAuSon/easea,EASEA/easea,EASEA/easea,KevinAuSon/easea,EASEA/easea,EASEA/easea