Fix dev server detection function