fix render bounds calculation