correctly set max-age

currently the maxage options is ignored