corrected database reference error