Added some small "fixes" to threading test (basically it still doesn't really work...