fixed mesh constructor a bit