Fixed error fetching pid from route.