fixed isactive flag