bugfix: missed changing reference when adapting code