fix bug in tests