fixes from Gil's review
final pre-import fix from Gil's review