[yanan] fix two issues that cause turtle crash