Fixed errors in arbitrary generation