commands look like they are called properly...
fixed getopts misuse bug