Solved some difficulties with update thread