fix adaptive grid