Minor bug fix, the expiry time was not been set correctly