Fixed the weird bug with meshes.