Fixed getting scope for function arguments