Fixed typos
fixed else loop