Added clearing when switching targets