#369 Fixed with unit test.