Merging Haggard's changes