added check if visible controller is tabbarcontroller