fix trim bug
fix branch of deleteelement and addblock bug