fixed nasty bug leftover while refactoring