Fixed thread-0 bug

Closes #14