fixes to resource imports and fix a circular import