Fixed incorrect loop in model zeroing