fixed bug in type rolling