fix an render bug