fixed nasty bug that came with refactoring.