fix allocation flags