Debugging entropy calculation -- somehow getting values over 1. Hopefully this will fix the other issues.