fixing grace period problem