diff --git a/src/core/CellStructure.hpp b/src/core/CellStructure.hpp
index e81ae9abda1..74a51560b12 100644
--- a/src/core/CellStructure.hpp
+++ b/src/core/CellStructure.hpp
@@ -669,8 +669,10 @@ struct CellStructure {
* @brief Run kernel on all particles inside cell and neighbors.
*
* @param p Particle to identify cell and neighbors
- * @param kernel Function with signature double(Particle, Particle, Vector)
- * @return false if cell is not found via @ref particle_to_cell, otherwise true
+ * @param kernel Function with signature double(Particle, Particle,
+ * Vector)
+ * @return false if cell is not found via @ref particle_to_cell, otherwise
+ * true
*/
template
bool run_on_particle_short_range_neighbors(Particle const &p,
@@ -699,7 +701,7 @@ struct CellStructure {
Kernel &kernel, DistanceFunc const &df) {
/* Iterate over particles inside cell */
for (auto const &part : cell->particles()) {
- if (&part == &p) {
+ if (part.id() == p.id()) {
continue;
}
auto const vec = df(p, part).vec21;
diff --git a/src/core/energy.hpp b/src/core/energy.hpp
index 59aba46d526..cb11c0a089c 100644
--- a/src/core/energy.hpp
+++ b/src/core/energy.hpp
@@ -49,8 +49,7 @@ double observable_compute_energy();
* energy contribution for particle p
*
* @param pid Particle id
- * @return Double containing short-range Coulomb and non-bonded energy of the
- * particle
+ * @return Double containing non-bonded energy of the energy
*/
double particle_short_range_energy_contribution(int pid);
diff --git a/src/python/espressomd/cellsystem.pyx b/src/python/espressomd/cellsystem.pyx
index 07dc3ca9a1e..015d82b43b9 100644
--- a/src/python/espressomd/cellsystem.pyx
+++ b/src/python/espressomd/cellsystem.pyx
@@ -146,6 +146,10 @@ cdef class CellSystem:
The list of neighbor particles surrounding the particle
"""
+ check_type_or_throw_except(
+ particle, 1, ParticleHandle, 'type is not a particle')
+ check_type_or_throw_except(
+ distance, 1, float, 'distance must be a float')
cdef vector[int] list_of_neighbors
list_of_neighbors = mpi_get_short_range_neighbors(
particle.id, distance)