Fix 'has no method' exception