fixed array handling in showMessage