flags are now handled correctly