Rectified db issues