Fix buildSession call for database handler