fixed ruler overflow