Fix bug causing problems with profile likelihood analysis