Fixed error when all menu items have null parent_id