Handling modal alert on page