fix else if problem