minor fixes
[BUG #8186] add more tests