fixed bad parameter checking for -u and -w