Fixed bug in Dipolarity calculation