fix bugs of subString on portal
refactory bus to add engine