bugfix and convert entropy to real