Further changes & test for #222