fix render bugs