The problem was that readline would completely block LINES from updating after prompting the user. I'm not entirely sure why this happened, but at least this patch fixes the problem.