db access bug fixed