corrected bug where XML handlers were not being reset on parsing