fix initialization bug in which execution overwrites essential data