fixed small issues with getopt