Main render fixes
Upstream