Added a max to lines