fixed issues with detecting imports