add addNewContents callback
fixes some bugs when switch tabs