fix bugs & preprocess inviter