Hopefully fixes chain / residue stuff