handle no references case