database bug fixed