Changed if to avoid empty div wrapping tabs