Fixed integration with refaker (rebased)

The last patch was broken, so I've reworked the issue after rebasing the latest changes.
We need bind test here, or the test ran will be incorrect