Fix e2e; add template function to make this possible

Running e2e now to make sure this fixes it.