Fixing x-axis overflow