fix pointer refs