Issue 1218 with unit test