Close Pd patch properly using message