AG: fix unit tests