Bug fixes and loop optimization to days on rig