Fixed Typo in onError method