BUG: fixed a bug in gibbs model