Fix null objects; now runs without crashing