Improvement (thanks to Hannes Uppman)