added check for header theme api header existing