Fixed bug in maxent equation