[rspec] server spec, fixed a few server bugs