fixed an issue with url_for and optional path parameters