Fixes off-by-one update script