Fixed so that update method is in used correctly from c++