added debug, fix routes when parents terminate by /