server setup, bug fixes