Crossover transition in bag-like models