fix grid problem for ios