Fix a syncronous bug in unlinking