fixed debug panel
merged in master with debug panel fix.