fix some bugs for leon