fix a bug that makes draw order wrong