Fix 'Illegal invocation'