[#193] implement fix suggested by @wdyang