Fixed DB errors