bug fix in gibbs scalar, but not all bugs