Corrected database issues