added tests

* test for BUG#1
* test for BUG#5