Swapped buffer input and output definitions, so they function as intended.