fix mishandled null bor problems