fixed getopt errors when compiling