Better solution for testing

This sounds a bug in original code ...
so your testing was a good way to find it out :D