Fix a minor bug in -l operation. Explain the input logic.