fixed duplicate prefix bug