Fix bug where we are not handling resources with '/' in path correctly.