Fixed issue with sorting bonds by atoms.

Error was due to a None in the bond list, due to a incorrect indent
that otherwise didn't cause problems.