fixed problems with single length vector being passed to formality (and by extension pos_by)

close #151