Merge PIM-3430 and PIM-3406 on master