Moved this to onFinish instead of duplicating it twice in success and failure