patches for common and Kernel/CriteriaElement