make sure server buffer doesn't overflow