mock fixes for older db versions