some type conversions, range -> array bug.