get rid of unwanted stuff in target