Device detection and scrolling fix