Tales of the Mirror: Fix bug and optimization

Fix bug and optimization