Argument parsing bug fixes