fix webhook processing bugs