Fixed some errors

accidentally used hard-coded value for ls function