Fix unpin bug