Fixed "Future already completed" bug