Fixed in one place but not the other; needs refactoring!