cleanup
fix uninitialized flag