DIRTY: fix local references