fetch json only once + small fixes