Fix the bug in the logic