Fix nil issue