fixed invalid read valgrind problems in TestDimension
Merge pull request #187 from jgrewe/master

fixed invalid read valgrind problems in TestDimension

LGTM