fixed boolean value checking errors and boolean scanner error