fixed some bugs in argIsOk. Still needs debugging