fixes issues from refactor