fix panel behaviour