Fixes currentPanel class
Bug fixes and improvements