Merge "fix this: closing database twice fails with IllegalStateException"