fixed bug in Mesh buffer generation