Fix update queries.
Update tests to always find ids using arrays.