Added statement to make a new Reference from user input if no valid reference could be found