Function 'updated' no longer updates only topmost elements