patch so that the $server arg works reasonably