fixed logic error with args parsing