Clear message queue at exit