added error handling for unsubscribe/subscribe