fixed bug involving deletion of pairlist elements, added tests for such