Fixed a bug with the line tool

Signed-off-by: Tabor Kvasnicka <kamakwazee@hotmail.com>