panel toggle bugfix