added a check for empty :path-info