Fix pinned flag