added few features from WT
+ minor fix for debug plugin