Avoid calling cleanup twice on error condition

It's already being called in the ```onError``` method.