fix some issues in framework