Removed duplicated code after open core for extension