fix updating method