Update and fix arrays