fixed directions json parsing bug to include case where xml header is included