Fixing a bug when line is specified