Revert "Merge pull request #1272 from bastiaanve/master"

This reverts commit cb6e4d3d83880dca12b27620e773b90704c11533, reversing
changes made to 0de7da47d40945772b49008a3908e47f83d5b79b.
Merge pull request #1298 from jongerrish/revert_replace_res_auto

Revert "Merge pull request #1272 from bastiaanve/master"
Revert "Revert "Merge pull request #1272 from bastiaanve/master""

This reverts commit 0ebb1aa666d4b61d396a4a64616d5671d83d61e7.