Ensure proper scope passed to init functions