Merge changes Ie479be5b,I299245fc

* changes:
  Fix if clauses
  Update error text