[3.8] Fix some bugs