Fixed returned format of errors.