fixed that the viewController do not get removed when it is hidden