Re-changed never-checked-in bug with setting mode bits