Added database fixes