Fix category tree stuff