Drop temporal database, fix bugs