Put setActive method in a try-catch block to prevent conflicts with other libraries