fixed small boolean bug