small changes
free corectly when message queue is full