carving: fix #305