fix pointer problem