@edvin I saw your last commit, where you replaced a when with an if.
The reason why I choose for a when (if I was the one who put it there), is that a when is more safe than an if without braces.
https://www.imperialviolet.org/2014/02/22/applebug.html