fixing bad loop caused by returning data in non-safe REST methods