Refactoring/fix