Fix expire_ function