fix previous selected category not being selected on edit page