fix $timeout unreliable in ensure_installed