make grid resize work