Revert "Use pop instead of assign plus later pop"

This reverts commit fee084d2d8eccfec60c3f915cf025d6db60794f5.