Incorporate change in assignment logic suggested by dhylands