fixed encounter bug
trying to merge