updates, bug fixes

bug fix in CoordToArray