fixing various bugs do to latest refactor.