fix second nil ref