More work to make profile_likelihood give reasonable results