Small code clean up + added a failing unit test.