Fixes issue with return nil