Fix of code duplication