fix getopt hangling