Changing alert to error for flash message