added code to handle invalid private message commands