Fix off-by-one connection limit check