Fixed study update function and removed loop