Database Bug Fixes