fix bug when contextpath is not root