store elements in the right order in input ring

Signed-off-by: Moritz Ulrich <ulrich.moritz@googlemail.com>