Issue #250, add tests