Ensure that i var is initialized