Fix payload being accessed from wrong var