Cancelling request at the right time