fixed connection errors w database