Fix pinPanel race; thanks to @fqueze for the help