Some necessary changes to run tests properly