Fixed some bugs in testmod_line