Fix nil assignment