fixing bugs introduced by refactoring