fixed usage of invalid pointer
const