fix dimensions grid
fix detection not correct