fix references too