fix some compilation errors in element wise functions