Fix boolean flags