fix some bugs
fix the frame