fix grid bug and add nested query