Fixed typo

There's a typo on the error variable that causes some PHP errors