Fix: code duplication