some bugfixes
Ported the new stuff into ROOT plots, matplotlib ones need changes