Changed the refs check