fix some more bugs from the refactor