Fix undefined rapp_name when stopping

There is no rapp_name defined in the exception block here (this was the reason for removing it in the former pull request).