Fixed an array for each bug