fix else handling