Fix boolean check fail from a8ec134c2c34482bedf08c6d022cbbc5ca3fa7bc