fixed nested function calls not being properly evaluated