WIKI-758 Re-order the condition in if clause.