before cleaning up message page