fix tests and invite window code