Tweaks to work around shader bug