Will now get closest target & fixed a bug with looting.