Fixed DB bug