Bug fixing: internal _error_weight key is now removed after use