db context fixes