Fixing invoke bug