Fixed DB issues