fixed 2 small bugs related to removing tags