Fixed several ruler scrolling bugs