Fixed check so that it is not dependent on the test context location