fixed alert message not being displayed correctly