optimized delegation and fixed router bug