fixed bug when comparing location of Task