Fixed wrong refactoting