fix constant object weak reference bug