Added some threading to help with hang.