Fixed issue with ls flag

Signed-off-by: Adrian Martin <amartin@pointslope.com>