Revert part of the change from e0537ce3dfba5c5bcfc78f5ba29c759de9e397ad, fixes #458