bugfix loop to call delegate