Made db integrity check compatible with pre-4.1 devices