worked in comments to c4ae663 by @ogasser