fix bug that grid displayed incorrect