fixed q-val building
long -> int
Merge pull request #1 from scopatz/q_vals

fixed q-val building