Fixed missing code that eluded unit test