max_conn bugfix