fix flags and documentation