fixed threading issue (threads would never end causing app to eventually
crash)