Added fix and test for #263