Fixed issue with alert messages not being removed