errorReceived may not be defined