fixed flickering issue when entities of same depth overlapped