Fix for __exit__ DB errors
Merge remote-tracking branch 'origin/dev'