fixed code section counting, which highlighted a larger problem