Looks like `$object` may be undefined here