fixed bug

onSuccess was being calculated every page