Successfully fixed bug for assignment

Modified code to allow for a refresh with zero elements.