Fix nil setting error