Merge pull request #314 from scrollback/bug-fixes

Bug fixes
initialize threads to empty array