Adding a workaround for enterprise setups, and fixing tests for said workaround