Database collection access fix