Added check for oddness of qgrid_size