Added lockPromise