Fix sincedb write