fixed some function mode