fixed bug causing index out of range exception on adding voxels.