Revert old workaround, fix the original issue in a cleaner way