Fixes some errors in tests