fix mode in clientserver script