Resolved issue with pats containing space characters