server fix and profiling