fixed bug in dec sampling