Fixing invoke errors