fix some problems about frame