Fixed potential bug in toTrueArray