small changes to maxconn calculation