Fixes the issue of converting set to array.