created test case to reproduce error
fixed bug