fix #636 and v-ref for real