Again, improve helpers.dot function.