added bugfix for getopts