fix warn in save_subscription
moved inline callback into its own sub