bugfix for 3d patches