Fixing nil issue