some stupid flag changes mixed up with proper changes