fix for move of withTrailing in js