fix element mapping and setting