Sqlite bugfix: Null pointer exception and database not reloaded