Return weight of 0 instead of infinity when total fitness is 0 for a test instance