Updating to prevent zero-size targets and rows on train & targets