fix grid box rendering issue