fixed errors in pair potential