Added extra error handler, error case for invalid form