fixing bug in ls