bug fix in getting enemy id