Fix indirect select throw error when grid goes empty