Fixed some errors in tests