Fixed issues after refactor.