Changed error messages to flash notices