only call showMessage if it was defined
bugfix for only call showMessage if it was defined