Fixed nullpointer exception and added new functionalities on hosttracker

Change-Id: I988121a16bdd95ea50e3405b55730f8bc8980f75
Signed-off-by: André Martins <aanm@ua.pt>