Fixed double-visiting bug