updated with a test for issue 141