Fix EHP calculations