Fixed category not being set properly when editing a task.