temporary workaround for "avg" apply