fixed a bug with energy score