Fixing equation 9