jca: changing scalar writes to better handle type conversions