Not setting ref if empty