fixed bug calculating whether pointer within area