fixed boolean error bug