clear messages whenever modal pops up