fix a couple bugs in setup