fixed a bug in func_alt