Setup Fixes

Fixed some bugs in the setup account and setup database scripts.