Fix Utility.compactArrays type error