Solves horizontal scrolling bug