made sure not to set line cap if line is closed