proper fix for #1067, 423ad98f487859eec81cc3194293eaa15b758284 was incorrect