Fix array and map lengths