Optimizations and another possible fix for whitescreens on some devices