fixing bug with CSOM fields cast