Issue #254 resolved with tests