preveting callback to be called twice when it fails the first time