Fixing "object 'y' not found" errors