Another bugfix for keeping in box function and long particle leaps