Merge some changes from K3.1