Fix bug with too many edges for TLS boxes