Ensure the callback is only called when the result is complete