fix bug: mesh loader was copying wrong amount of data