Fixed subtle bug in re-rendering.