Handling edge case for ruler