Function bugs fixed

Function parameter passing bug, default value of function changed into
to "none", none object allocation bug fixed,