Solving flashing problem