Fix update method. Close #13