Fix probelms with conditional import