fix overwrite flag