Hopefully fixed the encounter error.