define now actually delivers a correct link, instead of a pageid of undefined.