Changes and tests for #223