Fixed issue in the ToSimpleArray.