Bad pointer after updating nx5