Change lock check in rest api to get the right meta