Hrm, we should probably make this use the proper flags as defined in the header. Looks like these might be backwards as is.