bugfix: saving wrong last value received