Fix DB offset method. Can not be negative.

As suggested, pulling to 4.1.