Merge "Fix bug in expires time calculation"