fix last_uri method