fix cloud ref bug