improved performance by deploying fix suggested by @misch

thx @misch