Fixed 2 segfaults caused by calculating offsets into the two databases in correctly
Fixed 2 segfaults caused by calculating offsets into the two databases in correctly

rossdylan/uvb-server,robgssp/uvb-server