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"