fix crash after click on empty part of panel