@thyageshm, yes we should add a 'closing in x minutes' warning. But let's do that as a separate issue. 
Yes, the the grace period is supposed to mitigate this scenario. Some instructors set it to 0 though. And some students overshoot the grace period as well. :-p