corrected ls bug + storage in thread.