fixed bad handling of input args