Fixed a bug where MAP sample could not be found due to an incorrect assumption about deviance values.