Revert "Another approach to fix the problem. Still wrong but is it going better?"

This reverts commit 71c2941d54dc8b9ca88ee1f1d08434a807efc110.