Fix #5: Reset visited