fix to alert warning message not removing