Fix nil issues