fixing getopt on client