Fixed bug with u[j] updating more than once per run.