fixed a bug which could cause setup to hang