fixed a missing calculation