Update before submit