fix debugtool, fix pm window