Fix for issue #1702. Thanks for the heads up @anikitas.