fix onError should have been onReceiveError