Fixes for Database