Added failing test case.
Fixed bug.