statefull rest bugfix