Receiving loaned money from someone who earns haram income


If i have loaned someone money.
Now it is time for them to pay it back but I now know they only earn haram income.

Is it haram for me to get back my own (halal) money which i gave previously?

If it is haram to take back my own money due to them only earning haram,

Does the ruling change if i am now in need of the money for necessities?