Fix max energy decreasing.