Fixes nested function calls