Fixes to array/db diff