fixed getopt