fixes an indexing bug in computing nonbonded forces