Correcting bug in function Deal().