fixes for non-standard db ports.