fix dereferencing error