Added tests to reproduce the exception