Fixed minor bugs
Added server test