Working, but slightly naive implementation of fixing arrays.