Fixes statement refs.