Max axis length code added.