Fix viewport rendering issues.