issue #5183. fix retain/release problem