Fixed bug with undefined variable(error instead of errorValue).