bug solved, I put an error message to avoid the problem, the rho was initilized two times, making the pointer different at the second initialization.