fix memory lock service, lock was removed from map not at the good time