Toggle active and inactive state appropriately