fixed a bug with calculating the expire date