Remove duplicated code
Merge pull request #432 from ovr/ext_fixes

Remove duplicated code