Fixes issues with tests