fixing problems with pim due to merge with master