detect if source and destination are the same