fix edit page csrf, category slug optional