fixed end-residue bug and subjob panel names bug