Fix threading error, document added