fix buildSession call for database handler