fixed maxage bug