fix server detection