fixed remove invitation bug in js