Fix when for smex.