check dimensions on overflow