Fixed initialization logic