Correct some minor issues with mode flag