fix error when bool is false