Merge "Add init() to avoid crash when creating ref in constructor."