fix optparsing in testing