Fix bug in active() method