fixes to conversion of potfit potential