Refactor/fix