fix various compile issues