fixed update weight function