Minor fixes

-summing up pizzas
-fixing sub_thread ids