Fixed error drawing the lines