fix bug in grid component for ios