fix various issues regarding targets