Bhattacharyya calculation fixed