fixed srv generation bugs