Fixes for issues affecting contactsd