fix bug in ls