fix reading of imports