Some fixes for putting the residue name in the right place.