### What problem does this PR solve? 1. Remove the useless pop logic due to already been checked at the if logic 2. merge log logic ### Type of change - [x] Refactoring