added some minor bug fixes for server