fixed flag errors, fixed usage