Fixes following testing across multiple db platforms