Fixed issues #34 and #42. No more failing tests.