Fix bug: delete buffer which has linked in some history will cause navigation failure.