Fixed another database bug