Corrected one bug - v1.1

Moved the condition to verify if there are terms of the taxonomy
attached to the post before the reset of the terms.