fixed bug with incompatibile Date type. Date values are now long values.