Couple of bug fixes

Rolling up two bug fixes into a single pull. Sorry I should have done these on separate branches.
1. List retrieval only returned one element
2. xml comments were causing retrieval problems for more complex xpaths.