Fixed reference leaks in callMethod_sync() and getattr().