Fixed misplaced-code-after-cleanup-before-commit