Fixed bug in when msg id is passed