fixed else bug