Fixed bug while calling success callback