fixed all the msg queue related problems (I presume it can not possibly have another bug) and added a selective error possibility