Fixes for the mesh scripts