Deleting unwanted ref