Fixed
Fixed threading issues to run smoothly.