fixed bug that for dimensions from outside