Database Abstraction Layer Fixes