Try to fix weird lock issue, fix build