Fix renew token function