Merge "Fix a bug when calling onError(int)"