add map ref, fix #866