fixed database reference