Fixed when and let to maintain context