Fixed a bug with occasional loading with the wrong dimensions.