fixed code never executing