Fixes to mesh parsing script