fix some sqlite things