Get rid of the casts in copyCursor(). be specific about copy() result type.