small am bugfix; more tests