Fixed bug in code so that unit tests now pass