cleanup
fixes bug with non-boolean flags