Fix bug in adaptive date scale