fix some schema+profile linking bugs