database integration fixes