Fixed action and added error message