bugix: end_loc calcultion while iteration