various updates and bug fix for rpd