fix issue #547
add test for pr 548
add more tests for PR 548
rename test classes
Merge pull request #548 from hylent/master

fix issue #547