Close db cursor. Update libraries