add invite used
fix bugs