Fix some bugs with specific targets.