Small refactor, little hotfix