fixed bug on message queue process.