Better handling of pattern arguments