Fixing #325 Added unit test to show the error. Unit test currently fails