bug fix on meshgen