fixed bug with internal function as equation