fixed a few issues in zone/zonedb.cpp