Line regex bug fix