fixed triggerDistance bug