fix bug in component pattern for grid