Improve profile merging