fixing Promise[s] being left open