Remove lastPromise when necessary