added error alert